import requests

import config


class TenderAPI:

    # 封装投资的接口
    @classmethod
    def tender(cls,session,amount):
        url = config.Host + "/trust/trust/tender"
        header = {"Content-Type": "application/x-www-form-urlencoded"}
        body = {"id": 642, "depositCertiﬁcate": -1, "amount": amount, "password": ""}
        # print("body=",body)
        resp = session.post(url=url, headers=header, data=body)
        return resp

    pass
